package students;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        Student[] arr = new Student[5];
        for (int i = 0; i < arr.length; i++) {
            System.out.println("请输入分数：");
            int score = scan.nextInt();
            if (score >= 80) {
                arr[i] = new GoodStudent(score);
            } else if (score < 60) {
                arr[i] = new BadStudent(score);
            } else {
                arr[i] = new NormalStudent(score);
            }
        }

        for (int i = 0; i < arr.length; i++) {
            arr[i].study();
        }
    }
}
